package com.gd.iot.energy.pojo.datapush.ctwing.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 设备事件
 * <p>
 *     {
 * 	"tenantId": "1",
 * 	"productId": "10010208",
 * 	"deviceSn": "111qw",
 * 	"deviceId": "10010208111qw",
 * 	"messageType": "eventReport",
 * 	"imei": "xxx",
 * 	"imsi": "xx",
 * 	"timestamp": 1554190965950,
 * 	"eventType": 1,
 * 	"eventContent": {
 * 		"m": 44
 *        },
 * 	"serviceId": 1001,
 * 	"protocol": "rdap"
 * }
 * </p>
 *
 * @author kris
 * @date Created at 8:35 上午 2020/8/29
 */
@Setter
@Getter
@ToString
public class DeviceEventDTO {

    /**
     * 租户ID
     */
    private String tenantId;


    /**
     * 产品ID
     */
    private String productId;

    /**
     * 设备编号
     */
    private String deviceSn;

    /**
     * 设备ID
     */
    private String deviceId;

    /**
     * 消息类型=eventReport
     */
    private String messageType;

    /**
     * 终端设备识别号
     */
    private String imei;

    /**
     * 终端sim卡标识
     */
    private String imsi;

    /**
     * 时间戳
     */
    private Long timestamp;

    /**
     * 事件类型，信息:1,警告:2,故障:3
     */
    private Integer eventType;

    /**
     * 事件上报数据
     */
    private EventContent eventContent;

    /**
     * 协议类型
     */
    private String protocol;

    /**
     * 服务ID
     */
    private String serviceId;

    @Setter
    @Getter
    @ToString
    public static class EventContent {
        private Integer m;
    }
}
